package com.fasc.open.api.client;

import com.fasc.open.api.bean.base.BaseRes;
import com.fasc.open.api.bean.req.corpmanage.GetManageUrlReq;
import com.fasc.open.api.bean.req.corpmanage.GetTemplateUrlReq;
import com.fasc.open.api.bean.res.common.EUrlRes;
import com.fasc.open.api.bean.res.common.PUrlRes;
import com.fasc.open.api.constants.OpenApiUrlConstants;
import com.fasc.open.api.exception.ApiException;

/**
 * @author Fadada
 * 2022/01/12 16:09:38
 */
public class CorpManageClient {
    private OpenApiClient openApiClient;

    public CorpManageClient(OpenApiClient openApiClient) {
        this.openApiClient = openApiClient;
    }

    public BaseRes<EUrlRes> getManageUrl(GetManageUrlReq req) throws ApiException {
        return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MANAGE_GET_MANAGE_URL, EUrlRes.class);
    }

    public BaseRes<PUrlRes> getTemplateUrl(GetTemplateUrlReq req) throws ApiException {
        return openApiClient.invokeApi(req, OpenApiUrlConstants.CORP_MANAGE_GET_TEMPLATE_URL, PUrlRes.class);
    }
}
